{extend name="./oscshop/admin/view/public/base.html" /}
{block name="content"}
<div class="page-header">
<h1>	
	移动端
	<small>
		<i class="ace-icon fa fa-angle-double-right"></i>
		{$breadcrumb1}
	</small>
	<small>
		<i class="ace-icon fa fa-angle-double-right"></i>
		文字回复
	</small>
</h1>
</div>
	<div class="row">
	<div class="col-xs-12">	
	
       <div class="form-horizontal">
        	
        	{if condition="$Request.param.id"}
			<input name="tr_id" type="hidden" value="{$Request.param.id}" />
			{/if}			
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> * 关键字 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="keyword" id="keyword" class="col-xs-10 col-sm-5" placeholder="关键字" value="{$reply.keyword|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label"> * 回复内容</label>
				<div class="col-sm-10">
					<div class="clearfix">
						<textarea id="content" class="form-control" placeholder="回复内容" rows="5" name="content">{$reply.content|default=''}</textarea>
					</div>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label">启用</label>
				<div class="col-sm-10">
					<label class="radio-inline">
					<input type="radio" checked="checked" value="1" name="status">是</label>
					<label class="radio-inline">
					<input type="radio" value="0" name="status">否</label>
				</div>
			</div>	          	
          	
          	<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left"> </label>	
				<div class="col-sm-11">
					<input id="send" type="submit" value="提交" class="btn btn-primary" />
				</div>
			</div>
          	
        </div>

	</div>
</div>
{/block}
{block name="javascript"}
<script>

$(function(){
	Oscshop.setValue("status", '{$reply.status|default=1}');	
});

var back_index="{:url('ReplyBackend/text')}";

$('#send').click(function(){
	$.post(
		'{$action}',
		$('input[type=\'text\'],input[type=\'hidden\'],input[type=\'radio\']:checked,textarea'),
		function(d){
			art_dialog(d,back_index);
		}
	);
});
</script>
{/block}